package edu.calvin.djs32.cs214.interpreters.calculator.primitives;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

import edu.calvin.cs214.hobbes2008.IntegerTIR;

public class SubtractPrimitiveTest {
	@Test
	public void shouldApplySubtraction() {
	  assertEquals(new IntegerTIR(1), new SubtractPrimitive().apply(null, new IntegerTIR(3), new IntegerTIR(2)));
	  assertEquals(new IntegerTIR(7), new SubtractPrimitive().apply(null, new IntegerTIR(10), new IntegerTIR(3)));
	  assertEquals(new IntegerTIR(0), new SubtractPrimitive().apply(null, new IntegerTIR(-3), new IntegerTIR(-3)));
	}

}
